{extend name="admin@public/base_content" /}
{block name="body"}
<body>
{include file="admin@public/common" /}
<!--头部搜索开始-->
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding" style="margin-bottom: 0px">
                <form class="layui-form" action="{:url('')}">
                    <div class="layui-form">
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <input class="layui-input" name="keyword" value="{$pageMaps.keyword|default=''}" placeholder="关键字">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <select name="status">
                                <option value="0">选择状态</option>
                                <option value="1" {eq name="pageMaps.status" value="1"}selected{/eq}>开启</option>
                                <option value="2" {eq name="pageMaps.status" value="2"}selected{/eq}>关闭</option>
                            </select>
                        </div>
                        <div class="layui-inline">
                            <button lay-submit class="layui-btn" lay-filter="search">查找</button>
                        </div>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>
<!--头部搜索结束-->
<div class="layui-form">
    <table class="layui-table lay-even">
        <thead>
        <tr>
            <th width="80">ID</th>
            <th>下拉框</th>
            <th>text</th>
            <th>单图</th>
            <th>添加时间</th>
            <th width="80">排序</th>
            <th width="100">状态</th>
            <th width="240">操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach name="list" item="vo"}
        <tr>
            <td>{$vo.id}</td>
            <td>{$vo.ykb_selected}</td>
            <td>{$vo.ykb_input_text}</td>
            <td><img src="{$vo.image}" width="80px" height="80px"></td>
            <td>{$vo.add_time|date='Y-m-d H:i',###}</td>
            <td><input type="text" class="layui-input ajax-blur" name="field_value" value="{$vo.sort}" data-params='{"url":"{:url("api/api/upField")}","data":"table=shili&id_name=id&id_value={$vo.id}&field=sort","loading":"false","complete":"up"}'> </td>
            <td><input type="checkbox" name="field_value" lay-skin="switch" value="1" lay-text="开启|关闭" {eq name="vo.status" value="1"}checked{/eq}  lay-filter="ajax" data-params='{"url":"{:url("api/api/upField")}","confirm":"true","data":"table=shili&id_name=id&id_value={$vo.id}&field=status","complete":"up"}'></td>
            <td>
                <a href="{:url('info',array('id'=>$vo['id']))}" class="layui-btn layui-btn-mini modal-catch">
                    <i class="iconfont">&#xe653;</i>编辑
                </a>
                <a class="layui-btn layui-btn-mini layui-btn-danger ajax"
                   data-list='{"key":"id={$vo.id}","msg":true,"render":"true","action":"del"}'
                   data-params='{"url": "{:url("del")}","confirm":"true","data":"id={$vo.id}","complete":"del"}'>
                    <i class="iconfont">&#xe626;</i>删除
                </a>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
</div>
<div class="text-right">
    <div class="layui-box layui-laypage layui-laypage-molv" id="layui-laypage-1">
        {$list->render()}
    </div>
</div>
</body>
{/block}
{block name="script"}
<script>
    layui.use('default');
</script>
{/block}